package com.xingkeduo.pojo.table;

import com.xingkeduo.util.pojo.base.BaseTable;
import com.xingkeduo.util.tool.IdentityUtil;
import com.xingkeduo.util.tool.IdentityUtil.Worker;
import org.apache.ibatis.type.Alias;

import java.util.Date;
import java.util.List;

/**
 * 一线员工工作属性类
 *
 * @author 高杰
 * @time 2018年12月25日 下午4:59:34
 * @description
 */
@Alias("CraftsmanJob")
public class CraftsmanJobTO extends BaseTable<CraftsmanJobTO> {
    private String nickName;
    private String contactName;
    private String contactPhone;
    private Date inTime;
    private Date gradTime;
    private Date formalTime;
    private Date leaveTime;
    private long shopId;
    private long levelId;
    private long dutyId;
    private long companyId;
    private long cityId;

    private List<CraftsmanJobDetailTO> details;

    public Date getGradTime() {
        return gradTime;
    }

    public CraftsmanJobTO setGradTime(Date gradTime) {
        this.gradTime = gradTime;
        return this;
    }

    public long getShopId() {
        return shopId;
    }

    public CraftsmanJobTO setShopId(long shopId) {
        this.shopId = shopId;
        return this;
    }

    public long getCompanyId() {
        return companyId;
    }

    public CraftsmanJobTO setCompanyId(long companyId) {
        this.companyId = companyId;
        return this;
    }

    public CraftsmanJobTO() {
    }

    public String getNickName() {
        return nickName;
    }

    public CraftsmanJobTO setNickName(String nickName) {
        this.nickName = nickName;
        return this;
    }

    public String getContactName() {
        return contactName;
    }

    public CraftsmanJobTO setContactName(String contactName) {
        this.contactName = contactName;
        return this;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public CraftsmanJobTO setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
        return this;
    }

    public Date getInTime() {
        return inTime;
    }

    public CraftsmanJobTO setInTime(Date inTime) {
        this.inTime = inTime;
        return this;
    }

    public Date getFormalTime() {
        return formalTime;
    }

    public CraftsmanJobTO setFormalTime(Date formalTime) {
        this.formalTime = formalTime;
        return this;
    }

    public Date getLeaveTime() {
        return leaveTime;
    }

    public CraftsmanJobTO setLeaveTime(Date leaveTime) {
        this.leaveTime = leaveTime;
        return this;
    }

    public long getLevelId() {
        return levelId;
    }

    public CraftsmanJobTO setLevelId(long levelId) {
        this.levelId = levelId;
        return this;
    }

    public long getDutyId() {
        return dutyId;
    }

    public CraftsmanJobTO setDutyId(long dutyId) {
        this.dutyId = dutyId;
        return this;
    }

    public long getCityId() {
        return cityId;
    }

    public CraftsmanJobTO setCityId(long cityId) {
        this.cityId = cityId;
        return this;
    }

    public List<CraftsmanJobDetailTO> getDetails() {
        return details;
    }

    public CraftsmanJobTO setDetails(List<CraftsmanJobDetailTO> details) {
        this.details = details;
        return this;
    }

    public static CraftsmanJobTO build() {
        return new CraftsmanJobTO().initId(IdentityUtil.nextId(Worker.USER));
    }

    public CraftsmanJobTO copy(JobseekerJobTO jobseekerJob) {
        return this.setCityId(jobseekerJob.getCityId()).setContactName(jobseekerJob.getContactName())
                .setContactPhone(jobseekerJob.getContactPhone());
    }
}
